package com.sicheng.蓝桥.省赛.第九届;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * @author zsc
 * @version 1.0
 * @date 2022/1/26 16:59
 */
public class 日期测试 {

    public static void main(String[] args) throws ParseException {
        Calendar calendar = Calendar.getInstance();
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        Date start = dateFormat.parse("2001-10-1");
        calendar.setTime(start);
        calendar.add(Calendar.DATE, 32);
        System.out.println(calendar.get(Calendar.MONTH) + 1);
    }

}
